<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>登录</title>
</head>
<body>

请输入你的秘密
<form action='' method='post'>
	<input type="text" name="user">
	<input type='submit' value='提交'>
</form>
<?php
	error_reporting(E_ERROR);
	if($_POST['user']){
		setcookie("user",$_POST['user'],time()+3600); 
		echo "你的秘密已经设置，别让别人知道啊！";
	}
?>
</body>
</html>